<!-- src/views/User/Center.vue -->
<template>
  <div class="personal-center">
    <div class="breadcrumb">
      <router-link to="/">首页</router-link>
      <span>/</span>
      <router-link to="/user/center">个人中心</router-link>
      <span v-if="$route.meta.breadcrumb">/</span>
      <span v-if="$route.meta.breadcrumb">{{ $route.meta.breadcrumb }}</span>
    </div>
    
    <div class="user-profile">
      <div class="sidebar">
        <ul class="menu">
          <li 
            :class="{ active: $route.name === 'UserCenter' }"
            @click="$router.push('/user/center')"
          >
            个人中心
          </li>
          <li 
            :class="{ active: $route.name === 'CompanyInfo' }"
            @click="$router.push('/user/center/company')"
          >
            企业信息
          </li>
          <li 
            :class="{ active: $route.name === 'BiddingInfo' }"
            @click="$router.push('/user/center/bidding')"
          >
            参与投标
          </li>
          <li 
            :class="{ active: $route.name === 'MyBids' }"
            @click="$router.push('/user/center/mybids')"
          >
            我的投标
          </li>
        </ul>
      </div>
      
      <div class="content">
        <div v-if="$route.name === 'UserCenter'" class="user-info-content">
          <div class="user-header">
            <h3>admin</h3>
          </div>
          <div class="info-item">
            <label>用户名称：</label>
            <span>admin</span>
          </div>
          <div class="info-item">
            <label>ip属地：</label>
            <span>辽宁省大连市</span>
          </div>
          <div class="info-item">
            <label>所属机构：</label>
            <span>企业机构</span>
          </div>
          <div class="info-item">
            <label>手机号码：</label>
            <span>15610565780</span>
          </div>
          <div class="info-item">
            <label>当前密码：</label>
            <span>********</span>
          </div>
        </div>
        <router-view v-else></router-view>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'PersonalCenter'
}
</script>

<style scoped>
.personal-center {
  padding: 20px;
}

.breadcrumb {
  margin-bottom: 20px;
  color: #666;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #1890ff;
}

.user-profile {
  display: flex;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-height: 600px;
}

.sidebar {
  width: 200px;
  border-right: 1px solid #eee;
}

.menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu li {
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.menu li:hover {
  background: #f5f5f5;
}

.menu li.active {
  background: #f0f7ff;
  color: #1890ff;
  border-right: 2px solid #1890ff;
}

.content {
  flex: 1;
  padding: 20px;
}

.user-info-content {
  padding: 20px;
}

.user-header {
  margin-bottom: 20px;
}

.info-item {
  margin-bottom: 15px;
  display: flex;
}

.info-item label {
  width: 100px;
  color: #666;
  font-weight: bold;
}

.info-item span {
  color: #333;
}
</style>